jest.dontMock('../tracelist')

describe('找到正确的sortMap',function(){
  var gridUtil;
  beforeEach(function(){
    gridUtil = require('../tracelist')
  })
  it('传入102时应该返回{key=timestamp,scend=asc}',function(){
    expect(gridUtil.gridSortScendFn('102')).toEqual({
      key:'timestamp',
      scend:1
    })
  })
  it('传入101时应该返回{key=timestamp,scend=desc}',function(){
    expect(gridUtil.gridSortScendFn('101')).toEqual({
      key:'timestamp',
      scend:-1
    })
  })
})
